List the contents of a directory in an unordered list,as well as a link to that content, in the form of a nicely formated block.

Just copy and paste the code into your page, if you like put the css into a seperate sheet, but basically all you have to do is call the function
dir_list_output() and in the argument(inside the parenthesis) put the directory path or the directory name if it is inside the same directory as the script like so: dir_list_output('dir_name'); and whuala! it outputs the directory contents. If you dont want the linking then just take off the tags so it just outputs the file name or ($file) is what i used to reference the file. Use as you wish, id appreciate it if you gave credit to me if you publish it else where. just put up my link: http://imagelightstudios.com/
Good luck, and thanks.

==========================================================

<html>
<style type="text/css">
#output a
{
	padding-left: 5px;
	font-family: verdana;
	font-size: 11pt;
	text-decoration: none;
	color: #ffffff;
}

#output a:hover
{
	height: 23px;
	width: 245px;
	display: block;
	background-color: #FFCC00;
}

#message
{
	height: 23px;
	width: 250px;
	display: block;
	background-color: FF9933;
	border-bottom: 1px solid #000000;
}
</style>
<ul type="none">
<?
function dir_list_output($u_dir)
{
	$dir = $u_dir;
	$dir_path = $dir.'/';
	$handle = opendir($dir_path);
	?><br><?
	while (false !== ($file = readdir($handle))) 
	{
		if($file == '.' || $file == '..')
		{
		}
		else
		{
			$link = 'dir_path'.$file;
			$output = '<a href="'.$link.'">'.$file.'</a><br>';
			?>
				<li class="message" id="message"> <font class="output" id="output"><? echo $output ?></font></li>
			<?

		}
	}
}

?>
</ul>
</html>